Namespace Services
    Public Class EteriaAmountCalculator
        Implements IAmountCalculator

        Public Sub applyAmount(ByVal claim As Model.Claim, ByVal Percentage As Decimal) Implements IAmountCalculator.applyAmount

            If claim.CoPerc1 = 100.0 Or claim.CoPerc2 = 100.0 Or _
                    claim.CoPerc3 = 100.0 Or claim.CoPerc4 = 100.0 Or claim.CoPerc5 = 100.0 Then
                ' DO NOTHING - Claim's ΚΑΤΑΠΙΣΤΕΥΜΑ part has been fully settled
            Else
                If claim.CoPerc1 = 0.0 Then
                    claim.CoPerc1 = Percentage
                Else
                    If claim.CoPerc2 = 0.0 Then
                        claim.CoPerc2 = Percentage
                    Else
                        If claim.CoPerc3 = 0.0 Then
                            claim.CoPerc3 = Percentage
                        Else
                            If claim.CoPerc4 = 0.0 Then
                                claim.CoPerc4 = Percentage
                            Else
                                claim.CoPerc5 = Percentage
                            End If
                        End If
                    End If
                End If
            End If
        End Sub

    End Class
End Namespace
